import moment from "moment";

import "braft-editor/dist/output.css";
import "./index.scss";

const BlogDetail = (props) => {
	const { article } = props;
	return (
		<div className="blog-detail">
			<h1 className="blog-title">{article.title}</h1>
			<p className="blog-sub-title">
				<span className="time">{moment(article.created_at).format("YYYY-MM-DD HH:mm:ss")}</span>
				<span className="count"><i className="iconfont">&#xe60a;</i>{article.lookCount}</span>
			</p>
			<div className="blog-content braft-output-content" dangerouslySetInnerHTML={{ __html: article.content }}></div>
		</div>
	);
};

export default BlogDetail;